namespace TomatoBreak.IntegrationSpecs
{
    using Machine.Specifications;

    using DataAccess;

    public abstract class DatabaseSpec
    {
        protected static SessionProvider sessionProvider;

        Establish context = () =>
        {
            sessionProvider = SessionProviderFactory.Create();
            sessionProvider.CreateSchema();
        };

        Cleanup on_exit = () =>
        {
            sessionProvider.DropSchema();
            sessionProvider.Dispose();
        };
    }
}